<template>
    <a-select v-model:checked="selectedList" placeholder="请选择会话成员" multiple :fallback-option="fallback" class="user-select">
        <template #label="{ data }">
            <ComAvatar :size="26" :sex="list.find(item => item.id === data.value)?.sex" :keys="list.find(item => item.id === data.value)?.initialLetter"></ComAvatar>
        </template>
         <!-- :disabled="item.id === loginId()" -->
        <a-option v-for="item in list" :key="item.id" :value="item.id" class="user-options">
            <ComAvatar :size="26" :sex="item.sex" :keys="item.initialLetter" class="avatar"></ComAvatar>
            {{ item.nickname }} ({{ item.email }})
        </a-option>
    </a-select>
</template>
<script lang="ts" setup>
defineProps({
    list: { type: Array, default: () => { return [] } },
    isDisabled: { type: Boolean, default: () => { return false } }, // 是否有禁用
})
const selectedList = ref([]); // 已勾选

</script>